<?php
    include_once("../action/checkAuthenticationAction.php");
    include_once("../service/hotlineService.php");
    
    include_once("../util/authUtil.php");
    $perm_array = $_SESSION["permissions"];
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Chi tiết sản phẩm</title>
	<?php 
        include("import-css.php");
        include("import-css-upload.php");
    ?>
    <style>
    ul { list-style-type: none; }
    ul#attribute li { background-color: #E0E0E0; cursor: s-resize; margin: 3px; }
    table td { vertical-align: top; }
    </style>
</head>
<body>
    <?php include("header.php");?>
    
	<div class="container-fluid">
		<div class="row-fluid">
            <?php include_once("menu.php");?>
			<div id="content" class="span10">
                    <div class="box span10 offset2">
                        <div class="box-content">
        					<form class="form-horizontal" method="POST" action="<?php if(authUtil(array("edit hotline","view hotline"),$perm_array,false)){ ?>../action/updateHotline.php<?php } ?>" id="update_hotline_form">
                                <div class="control-group">
                                    <label for="hotlineContent" class="control-label">Hotline</label>
                                    <?php
                                    if(!authUtil(array("edit hotline","view hotline"),$perm_array,false)){
                                        echo "<script>window.location.href='../admin/index.php';</script>";
                                    }
                                    ?>
                                    <div class="controls">
                                        <input required type="text" value="<?php echo getHotline(); ?>" id="hotlineContent" name="hotlineContent" class="input-xlarge focused">
                                    </div>
                                </div>
                                <?php
                                    if(authUtil(array("edit hotline"),$perm_array,true)){
                                ?>
                                <center>
									<input type="submit" class="btn btn-primary" value="Cập nhật" />
                                </center>
                                <?php
                                    }
                                ?>
        					</form>
        				</div>                
                    </div><!--/span-->
            </div>
        </div><!-- end of row-fluid -->
        <?php include("footer.php");?>
    </div><!-- container-fluid -->
</body>
</html>